package oocis.oocisSharing;

import oocis.util.*;

public class Item {

	private String name;
	private User owner;
	private Time uploadTime;
	private Integer verID;
	private Integer mark;
	
	public Item(String _name, User _owner, Time _uploadTime, Integer _verID, Integer _mark){
		name = _name;
		owner = _owner;
		uploadTime = _uploadTime;
		verID = _verID;
		mark = _mark;
	}
	
	public boolean sameTo(Item _item){
		if (name != _item.name) return false;
		if (owner != _item.owner) return false;
		if (uploadTime != _item.uploadTime) return false;
		if (verID != _item.verID) return false;
		if (mark != _item.mark) return false;
		return true;
	}
	
	public boolean assign(Item _item){
		name = _item.name;
		owner = _item.owner;
		uploadTime = _item.uploadTime;
		verID = _item.verID;
		mark = _item.mark;
		return true;
	}
}
